/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import routes, { initRoute } from './router';
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import config from './config';

let appNavigator = createStackNavigator(routes, {
  initialRouteName: initRoute, 
  defaultNavigationOptions: {
    title: '',
    headerStyle: {
      backgroundColor: config.header.backgroundColor,
    },
    headerTintColor: config.header.color,
    headerTitleStyle: {
      fontWeight: 'bold'
    }
  }
})

export default createAppContainer(appNavigator)
